﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>下拉框演示...</title>
    <script src="/Style/JS/Aries.Loader.js"></script>
</head>
<body>
    <h3>单项</h3>
    <label>ConfigKey：</label><input type="text" configkey="性别" name="gender"  />
    <label>ObjName：</label><input type="text" objname="C_PB_Province" />
    <hr />
    <h3>属性配置</h3>
    <label>onlytext=true：（值也显示文本..）</label><input type="text" objname="C_PB_Province" onlytext="true" name="onlytext" /><br />
    <label>defaultItem=false：（不显示请选择..）</label><input type="text" objname="C_PB_Province" defaultitem="false" name="abc" /><br />
    <label>multiple=true：（多选..............）</label><input type="text" objname="C_PB_Province" multiple="true" /><br />
    <label>onchange=onchange：（事件...........）</label><input type="text" objname="C_PB_Province" onchange="onchange"/>
    <hr />
    <h3>单选级联</h3>
    <label>省份：</label><input type="text" name="prov" objname="C_PB_Province2" />
    <label>城市：</label><input type="text" name="city"  objname="C_PB_City2" parent="C_PB_Province2" />
    <label>区域：</label><input type="text" name="dist" objname="C_PB_District2" parent="C_PB_City2" />
    <hr />
    <h3>多选级联</h3>
    <label>省份：</label><input type="text" objname="C_PB_Province3" multiple="true" />
    <label>城市：</label><input type="text" objname="C_PB_City3" parent="C_PB_Province3" multiple="multiple" />
    <label>区域：</label><input type="text" objname="C_PB_District3" parent="C_PB_City3" multiple />
    <hr />
    <h3>树型下拉</h3>
    <label>省份：</label><input type="text" objname="C_PB_ProvinceCity" tree="true" multiple="true" cascadeCheck="true" width="200" />
</body>
</html>
<script type="text/javascript">
    function onchange(record) {
        if (record.value) {
            AR.Utility.Window.showMsg([record.value, record.text].join(','));
        }
        
    }
    function onlytext(record) {
        if (record.value) {
            AR.Utility.Window.showMsg([record.value, record.text].join(','));
        }

    }
    AR.Combobox.onAfterExecute = function (type) {
        if (type == "configkey") {
            AR.Combobox.setValues({ gender: 0 });
        }
        else {
            AR.Combobox.setValues({ onlytext: "河东区" });
            AR.Combobox.setValues({ prov: "200000000", city: "200100000" });
        }
    }
    

</script>